package com.czk.gulimall.auth.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @Author:ChenZhangKun
 * @Date: 2022/2/23 21:50
 */
@Configuration
public class WebConfig implements WebMvcConfigurer {
    /**
     * 减少自定义controller跳转页面
     * 例如
     *   @GetMapping("/login.html")
     *     public String login() {
     *         return "index";
     *     }
     * @param registry
     */
    @Override
    public void addViewControllers(ViewControllerRegistry registry) {
        // 替换页面跳转的controller
      //  registry.addViewController("/login.html").setViewName("index");
    }
}
